﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Articles.master" AutoEventWireup="false" CodeFile="ArticlesHome.aspx.vb" Inherits="ArticlesHome" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<fieldset>
<legend>Article Categories</legend>
    
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="ID" DataSourceID="DSArtCat">
            <Columns>
                <asp:BoundField DataField="Type" HeaderText="Type" SortExpression="Type" />
                <asp:BoundField DataField="Description" HeaderText="Description" 
                    SortExpression="Description" />
                <asp:BoundField DataField="Picture" HeaderText="Picture" 
                    SortExpression="Picture" />
                <asp:HyperLinkField DataNavigateUrlFields="ID" 
                    DataNavigateUrlFormatString="ArticleListing.aspx?ID={0}" DataTextField="ID" 
                    DataTextFormatString="View Article" HeaderText="View Artcles" 
                    Text="View Articles" />
            </Columns>
    </asp:GridView>

    <asp:SqlDataSource ID="DSArtCat" runat="server" 
        ConnectionString="<%$ ConnectionStrings:myFirstDatabase %>" 
        ProviderName="<%$ ConnectionStrings:myFirstDatabase.ProviderName %>" 
        SelectCommand="SELECT * FROM [tblArtCategory]"></asp:SqlDataSource>

</fieldset>
<br />
<fieldset>
<legend>Ratings for  Articles</legend>
    <asp:Chart ID="Chart1" runat="server" DataSourceID="DSArtView">
        <Series>
            <asp:Series Name="Series1" ChartType="StackedColumn" XValueMember="Title" 
                YValueMembers="Times_Viewed">
            </asp:Series>
        </Series>
        <ChartAreas>
            <asp:ChartArea Name="ChartArea1">
            </asp:ChartArea>
        </ChartAreas>
    </asp:Chart>
    <asp:SqlDataSource ID="DSArtView" runat="server" 
        ConnectionString="<%$ ConnectionStrings:myFirstDatabase %>" 
        ProviderName="<%$ ConnectionStrings:myFirstDatabase.ProviderName %>" 
        SelectCommand="SELECT * FROM [QTopViewArt]"></asp:SqlDataSource>
</fieldset>
<br />
<fieldset>
<legend><h3>Tags for  Articles</h3></legend>
<p>&nbsp;</p>
<div class="CloudBox">
    <asp:SqlDataSource ID="DSArticleTagCloud" runat="server" 
        ConnectionString="<%$ ConnectionStrings:myFirstDatabase %>" 
        ProviderName="<%$ ConnectionStrings:myFirstDatabase.ProviderName %>" 
        SelectCommand="SELECT * FROM [QArtTagCloud]"></asp:SqlDataSource>
                
        <asp:Literal ID="CloudMarkup" runat="server"></asp:Literal>
    </div>
</fieldset>



</asp:Content>

